//
//  HJVociePlayer.h
//  project
//
//  Created by hu on 2019/4/3.
//  Copyright © 2019 健健. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, LGAudioPlayerState){
    LGAudioPlayerStateNormal = 0,/** 未播放状态 */
    LGAudioPlayerStatePlaying = 2,/** 正在播放 */
    LGAudioPlayerStateCancel = 3,/** 播放被取消 */
};


NS_ASSUME_NONNULL_BEGIN
@protocol LGAudioPlayerDelegate <NSObject>

- (void)audioPlayerStateDidChanged:(LGAudioPlayerState)audioPlayerState forIndex:(NSUInteger)index IsRight:(BOOL)isRight;

@end

@interface HJVociePlayer : NSObject

+(instancetype)shareManager;

@property (nonatomic, copy) NSData *URLData;
@property (nonatomic, assign) NSUInteger index;
@property (nonatomic, weak) id<LGAudioPlayerDelegate>delegate;


- (void)playAudioWithURLString:(NSData *)URLString atIndex:(NSUInteger)index IsRight:(BOOL)isRight;

- (void)stopAudioPlayer;


@end

NS_ASSUME_NONNULL_END

